import React from 'react';

class SharedComponentWithGoofyName extends React.Component {
    state = {
        name: 'ls'
    }
    render () {
        return (
            <div>
                {this.props.wrapThisThingInADiv(this.state.name)}
            </div>
        );
    }
}

const SayHelloWithGoofyName = () => (
    // render 属性名称任意取依然有效
    <SharedComponentWithGoofyName wrapThisThingInADiv={(state) => (
        <span>hello! {state}</span>
    )} />
);

export default SayHelloWithGoofyName;
